package com.jiyinit.web.core.video.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.jiyinit.core.framework.base.paging.PagingResult;
import com.jiyinit.web.core.video.dao.TabCoreMroleIconDao;
import com.jiyinit.web.core.video.dto.MroleIconRequest;
import com.jiyinit.web.core.video.entity.TabCoreMroleIconEntity;

@Service("core.mroleIconServiceImpl")
public class MroleIconServiceImpl {
	
	@Resource(name = "core.tabCoreMroleIconDao")
	private TabCoreMroleIconDao tabCoreMroleIconDao;
	
	
	/**
     * 多条件分页查询
     * @param request
     * @return
     */
	public PagingResult<TabCoreMroleIconEntity> findForPage(MroleIconRequest request){
        return tabCoreMroleIconDao.findForPage(request);
    }
	
	/**
	 * id查询
     * @param id
     * @return
     */
	public TabCoreMroleIconEntity findOne(Integer id){
		return tabCoreMroleIconDao.findOne(id);
	}
	
	/**
	 * 添加
     * @param entity
     * @return
     */
	public int add(TabCoreMroleIconEntity entity){
		return tabCoreMroleIconDao.add(entity);
	}
	
	/**
	 * 修改
     * @param entity
     * @return
     */
	public int update(TabCoreMroleIconEntity entity){
		return tabCoreMroleIconDao.update(entity);
	}
	
	/**
	 * roleId删除
	 * @param roleId
	 * @return
     */
	public int deleteByRoleId(Integer roleId){
		return tabCoreMroleIconDao.deleteByRoleId(roleId);
	}

	/**
	 * 循环添加
	 * @return
     */
	public int addRoleIconByList(List<TabCoreMroleIconEntity> list){
		return tabCoreMroleIconDao.addRoleIconByList(list);
	}
	
}
